<template>
    <van-nav-bar :title="props.title" v-if="route.name == 'home'" />
    <van-nav-bar :title="props.title" v-else left-text="返回" left-arrow @click-left="onClickLeft" />

    <div style="height: 5rem;">

    </div>

</template>

<script setup>
const props = defineProps(['title'])

import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

const onClickLeft = () => history.back();



</script>

<style lang="scss" scoped></style>